package com.bpzj.util.validation;

import com.bpzj.util.validation.ChinaPersonIdCard;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

import java.math.BigDecimal;

import static com.bpzj.util.validation.ChinaPersonIdCard.Flag.ALLOW_EMPTY;
import static com.bpzj.util.validation.ChinaPersonIdCard.Flag.ALLOW_NULL;


/**
 * Created by bpzj on 2019-8-31.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PersonDto {

  @NotBlank(message = "姓名不能为空")
  private String name;

  private String age;

  private String height;

  private String birthday;

  private String deadTime;

  @ChinaPersonIdCard(flags = {ALLOW_NULL, ALLOW_EMPTY}, message = "身份证格式错误")
  private String idCardNo;
}
